home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok59.lha
/
AmokEd_V1.02b
/
txt
/
EdApplSub.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
65 lines
(*************************************************************************
:Program. EdApplSub.mod
:Contents. ApplicationSupportCommands for AmokEd
:Author. Hartmut Goebel
:Language. Oberon
:Translator. AmigaOberon V2.00
:History. V1.0, 07 Jul 1991 Hartmut Goebel [hG]
:History. V1.1, 12 Oct 1991 [hG]: +ErrorCodes
:Date. 17 Oct 1991 17:16:08
*************************************************************************)
MODULE EdApplSub;
IMPORT
e: Exec,
eAD: EdApplDefs,
edE: EdErrors,
edG: EdGlobalVars,
edM: EdMovement,
s : SYSTEM;
PROCEDURE doXClrPing*;
BEGIN
edG.Text.ExtPingPong := NIL;
END doXClrPing;
PROCEDURE doXPing*;
BEGIN
IF edG.Arg[0] # NIL THEN
edG.Text.ExtPingPong := s.VAL(eAD.XPingPongPtr,edG.Arg[0]);
ELSE
edG.ErrorCode := edE.invalidArgument;
edG.Rc := edE.cmdFailed;
END;
END doXPing;
PROCEDURE doXPong*;
VAR
arg: INTEGER;
BEGIN
arg := SHORT(s.VAL(LONGINT,edG.Arg[0]));
IF edG.Text.ExtPingPong = NIL THEN
edG.ErrorCode := edE.noXPPField;
ELSIF arg >= eAD.NumExtPingPong THEN
edG.ErrorCode := edE.invalidArgument;
ELSIF edG.Text.ExtPingPong[arg].line < 0 THEN
edG.ErrorCode := edE.XPPPosNotDefined;
ELSIF (edG.Text.ExtPingPong[arg].line > edG.Text.numberOfLines) THEN
edG.ErrorCode := edE.XPPPosOutOfRange;
ELSE
edG.Text.pos := edG.Text.ExtPingPong[arg].pos;
edM.JumpToLine(edG.Text.ExtPingPong[arg].line);
RETURN;
END;
edG.Rc := edE.cmdFailed;
END doXPong;
END EdApplSub.